<?php session_start();

require_once("../config/netease_config.php");
require_once("tblog.class.php");

function netease_login()
{
	$_SESSION['callback_count'] = 0;
	
	$oauth_obj = new OAuth(NETEASE_CONSUMER_KEY, NETEASE_CONSUMER_SECRET);
	$request_token = $oauth_obj->getRequestToken();
	$login_url = $oauth_obj->getAuthorizeURL($request_token['oauth_token'], NETEASE_CALLBACK_URL);
	
	$_SESSION['request_token'] = $request_token;
	
	header("Location:".$login_url);
}

netease_login();
?>